﻿<%@ Page  EnableEventValidation="false" Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Patients.aspx.cs" Inherits="QuanlyNhanVien" %>

<asp:Content ID="Content1" ContentPlaceHolderID="pageTitle" Runat="Server">
    <title>Hospital Management</title>
    <script>
        function clearTXT() {
            document.getElementById("mainContent_txtTimKiemBN").value = "";
        };
    </script>
    <style type="text/css">
        .auto-style1 {
            height: 26px;
        }
        .auto-style2 {
            height: 70px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainMenu" Runat="Server">
    <ul>
        <li><a href="Employ.aspx">Quản lý nhân sự</a></li>
        <li><a href="Patients.aspx" class="current">Quản lý bệnh nhân</a></li>
        <li><a href="Medication.aspx">Quản lý thuốc</a></li>
        <li><a href="Statistics.aspx">Thống kê</a></li>
    </ul>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="chMenu" Runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="mainContent" Runat="Server">
    <asp:Panel ID="pnlDanhSachBN" runat="server" HorizontalAlign="Left">
        <asp:TextBox ID="txtTimKiemBN" runat="server" Height="20px" placeholder="Tìm kiếm theo TÊN hoặc SĐT của bệnh nhân" Width="85%" CssClass="txtInput" onfocus="clearTXT();"></asp:TextBox>
        <asp:Button ID="btnTimKiemBN" runat="server" Text="Tìm kiếm" Width="7%" ToolTip="Tìm kiếm theo TÊN hoặc SĐT của bệnh nhân" OnClick="btnTimKiemBN_Click" />
        <br />
        <asp:GridView ID="grdDanhSachBN" runat="server" OnSelectedIndexChanged="grdDanhSachBN_SelectedIndexChanged" OnRowDataBound="grdDanhSachBN_RowDataBound" AutoPostback = "true" >            
             <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkRow" runat="server" Checked="false" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:Button ID="btnXoa" AutoPostback = "false"  runat="server" OnClick="btnXoa_Click" Text="Xóa bệnh nhân" style="float:right; margin-right:20px;" BackColor="Red" />
        <asp:Button ID="btnThem" AutoPostback = "false"  runat="server" Text="Thêm bệnh nhân" style="float:right; margin-right:20px;" BackColor="#84B818" OnClick="btnThem_Click" />
       
        <br />
    </asp:Panel>
    <asp:Panel ID="pnlThongTinBN" runat="server" Visible="False">
        <table style="width:60%; border: #84B818 solid 2px;" id="tblThongTin">
            <tr>
                <td align="center" bgcolor="#84B818" colspan="2">THÔNG TIN CHI TIẾT<br /> Mã số bệnh nhân:
                    <asp:TextBox ID="txtMaBN" runat="server" Width="86px" placeholder="Tự động" BackColor="Black" BorderStyle="Dotted" ReadOnly="True" style="color:#fff;"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="center" bgcolor="#CC66FF" colspan="2" class="auto-style1">THÔNG TIN BỆNH NHÂN</td>
            </tr>
            <tr>
                <td align="left" bgcolor="#CCCCFF" valign="top">Họ và tên đệm
                    <asp:TextBox ID="txtFirstName" runat="server" BorderStyle="Dotted" Width="168px"></asp:TextBox>
                    <br />
                    <br />
                    Địa chỉ
                    <asp:TextBox ID="txtAddress" runat="server" BorderStyle="Dotted" Width="224px"></asp:TextBox>
                    <br />
                    <br />
                    Ngày sinh
                    <asp:TextBox ID="txtDOB" runat="server" BorderStyle="Dotted" Width="201px"></asp:TextBox>
                    <br />
                    <br />
                    Ngày nhập viện
                    <asp:TextBox ID="txtDateR" runat="server" BorderStyle="Dotted" Width="158px"></asp:TextBox>
                </td>
                <td align="left" bgcolor="#CCCCFF" valign="top">Tên
                    <asp:TextBox ID="txtLastName" runat="server" BorderStyle="Dotted" Width="197px"></asp:TextBox>
                    <br />
                    <br />
                    Giới tính
                    <asp:DropDownList ID="cmbSex" runat="server" Height="24px" Width="164px">
                        <asp:ListItem Selected="True" Value="0">Nữ</asp:ListItem>
                        <asp:ListItem Value="1">Nam</asp:ListItem>
                    </asp:DropDownList>
                    <br />
                    <br />
                    SĐT
                    <asp:TextBox ID="txtTel" runat="server" BorderStyle="Dotted" Width="194px"></asp:TextBox>
                    <br />
                    <br />
                    Tình trạng hôn nhân
                    <asp:TextBox ID="txtMarital" runat="server" BorderStyle="Dotted" Width="80px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center" bgcolor="#CC66FF">THÔNG TIN NHÂN THÂN</td>
            </tr>
            <tr>
                <td align="left" bgcolor="#CCCCFF" valign="top">Họ và tên
                    <asp:TextBox ID="txtNOKFullName" runat="server" BorderStyle="Dotted" Width="198px"></asp:TextBox>
                    <br />
                    <br />
                    Địa chỉ
                    <asp:TextBox ID="txtNOKAdd" runat="server" BorderStyle="Dotted" Width="216px"></asp:TextBox>
                </td>
                <td align="left" bgcolor="#CCCCFF" valign="top">Quan hệ
                    <asp:TextBox ID="txtNOKRelationship" runat="server" BorderStyle="Dotted" Width="168px"></asp:TextBox>
                    <br />
                    <br />
                    SĐT
                    <asp:TextBox ID="txtNOKTel" runat="server" BorderStyle="Dotted" Width="194px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="2" bgcolor="#CC66FF" align="center">BÁC SĨ ĐỊA PHƯƠNG</td>
            </tr>
            <tr>
                <td align="left" bgcolor="#CCCCFF" class="auto-style2" valign="top">Họ và tên
                    <asp:TextBox ID="txtLDName" runat="server" BorderStyle="Dotted" Width="198px"></asp:TextBox>
                    <br />
                    <br />
                    Địa chỉ
                    <asp:TextBox ID="txtLDAdd" runat="server" BorderStyle="Dotted" Width="216px"></asp:TextBox>
                </td>
                <td align="left" bgcolor="#CCCCFF" class="auto-style2" valign="top">Phòng
                    <asp:TextBox ID="txtLDClinic" runat="server" BorderStyle="Dotted" Width="183px"></asp:TextBox>
                    <br />
                    <br />
                    SĐT
                    <asp:TextBox ID="txtLDTel" runat="server" BorderStyle="Dotted" Width="194px"></asp:TextBox>
                </td>
            </tr>
        </table>
        <br />
        <asp:Button ID="btnXong" runat="server" AutoPostback="false" BackColor="#84B818" Text="Lưu lại" OnClick="btnXong_Click" />
        <asp:Button ID="btnHuy" runat="server" AutoPostback="false" BackColor="Red" style="margin-left:20px;" Text="Quay lại" OnClick="btnHuy_Click" />
        <br />
    </asp:Panel>
</asp:Content>
